don't capture memory when read fails#1314
don't capture memory when read fails#1314Jamiras wants to merge 4 commits intoRetroAchievements:masterfrom
Conversation
|
From my undeerstanding here, this relies on the emulator's Just noting, that will require some changes in BizHawk's side before this is able to be taken advantage of (not that many anyways, just won't be usable within 2.11.1). Also on that, how does this code handle validity of the memory blocks changing at runtime? Pages of memory could be unmapped and mapped at runtime, especially say when memory allocation occurs (which might have the game end up mapping more memory as part of increasing one of the heaps, or vice versa with memory deallocation / shrinking the heap). The code doesn't appear to reset m_pInvalid bytes upon successful reads, only setting them upon failed reads. |
2ecf871 to
5bf2205
Compare
Yes. The memory read function (registered via This will happen each time a user starts a "New Search". The entire exposed memory will be "read", but any invalid regions will not actually be captured. If a user filters from that point, only the captured regions will be read, and any of those that return invalid regions will be treated as if the region returned all zeroes.
I guess it's possible that the user could be viewing a boundary when it gets shifted, but they're more likely to be fixated on a block of memory that's not at the boundary. |
Supports https://discord.com/channels/310192285306454017/1359607501213008194/1496647712278319124, which will define very large sparsely populated memory maps.
The "New Search" functionality will ignore any blocks where the emulator returns 0 bytes read, so despite having an 750MB memory map, the captured memory should still only be 256MB - which is still a lot, but a lot less than what it could have been.
Similarly, this will cause "New Search" to not capture empty blocks if a core doesn't expose some part of memory.